package com.healthcarex.hip.saas.common.constant;

public class CommonConstant {

    public static final String ABSOLUTE_PATH_ROOT = "//";

    public static final String KEY_SEPARATOR = "/";

    public static final String ARRAY_INDEX_BEGIN = "[";
    public static final String ARRAY_INDEX_END = "]";


    public static final String UTF8 = "UTF-8";

    /**
     * JSON 资源
     */
    public static final String CONTENT_TYPE = "application/json; charset=utf-8";

    /**
     * 错误标识
     */
    public static final String ERROR_FLAG = "0";

    /**
     * 成功标识
     */
    public static final String SUCCESS_FLAG = "1";

    /**
     * 字符串分隔符
     */
    public static final String STR_SEPARATOR = ":";

    /**
     * 生成成功字符串信息
     *
     * @param str
     * @return
     */
    public static String success(String str) {
        return SUCCESS_FLAG.concat(STR_SEPARATOR).concat(str);
    }

    /**
     * 生成错误字符串信息
     *
     * @param str
     * @return
     */
    public static String error(String str) {
        return ERROR_FLAG.concat(STR_SEPARATOR).concat(str);
    }

}
